package com.pls.data;

import java.util.List;

import com.pls.entity.Project;
import com.pls.mapper.ProjectMapper;

public class ProjectData {

	public List<Project> getProjectsByEmployeeId(int employeeId){
		List<Project> result = null;
		String query = "SELECT r.resource_id, p.project_code, p.project_desc, p.project_id FROM resource as r join project as p on p.project_id = r.project_id WHERE employee_id = '" + employeeId + "'";
		DataHelper<Project> helper = new DataHelper<Project>();
		
		ProjectMapper mapper = new ProjectMapper();
		
		result = helper.ExecuteQuery(query, mapper);
		
		return result;
	}
}
